function ApplicationWindow(title) {
	var self = Ti.UI.createWindow({
		title:title,
		backgroundColor:'white'
	});
	
	var button = Ti.UI.createButton({
		height:44,
		width:200,
		title:L('openWindow'),
		top:20
	});
	self.add(button);
	
	// Create a TextField.
	var aTextField = Ti.UI.createTextField({
		height : 35,
		top : 10,
		left : 40,
		width : 240,
		hintText : 'This is hint text',
		//softKeyboardOnFocus : Ti.UI.Android.SOFT_KEYBOARD_DEFAULT_ON_FOCUS, // Android only
		keyboardType : Ti.UI.KEYBOARD_DEFAULT,
		returnKeyType : Ti.UI.RETURNKEY_DEFAULT,
		borderStyle : Ti.UI.INPUT_BORDERSTYLE_ROUNDED
	});
	
	// Listen for return events.
	aTextField.addEventListener('return', function(e) {
		aTextField.blur();
		alert('Input was: ' + aTextField.value);
	});
	
	// Add to the parent view.
	self.add(aTextField);
	
	
	
	button.addEventListener('click', function() {
		//containingTab attribute must be set by parent tab group on
		//the window for this work
		self.containingTab.open(Ti.UI.createWindow({
			title: L('newWindow'),
			backgroundColor: 'white'
		}));
	});
	
	
	
	return self;
};

module.exports = ApplicationWindow;
